package BloodTimeHybernateDO;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;

import dao.api.DataObject;

/**
 * 
 * @author Cesar A. Fuguet T.
 * 
 */

@Entity
@Table(name = "vampiroarticulo")
@Proxy(lazy = false)
public class VampiroArticuloDO implements DataObject {

    // -------------------------------
    // Identificador auto-incremental
    // -------------------------------

    private int id;

    // --------------------------------

    private boolean equipado;

    // ------------
    // Referencias
    // ------------

    private VampiroDO vampiroId;
    private ArticuloDO articuloId;

    // ------------------------------------------------------------------------

    public VampiroArticuloDO() {
        // Empty
    }

    // ------------------------------------------------------------------------

    @Override
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "vampiroarticulo_sequence")
    @SequenceGenerator(sequenceName = "vampiroarticulo_sequence", name = "vampiroarticulo_sequence", allocationSize = 1)
    public int getId() {
        return id;
    }

    @Override
    public void setId(int id) {
        this.id = id;
    }

    // ------------------------------------------------------------------------

    @ManyToOne
    public VampiroDO getVampiroId() {
        return vampiroId;
    }

    public void setVampiroId(VampiroDO vampiroId) {
        this.vampiroId = vampiroId;
    }

    // ------------------------------------------------------------------------

    @ManyToOne
    public ArticuloDO getArticuloId() {
        return articuloId;
    }

    public void setArticuloId(ArticuloDO articuloId) {
        this.articuloId = articuloId;
    }

    // ------------------------------------------------------------------------

    public void setEquipado(boolean equipado) {
        this.equipado = equipado;
    }

    public boolean isEquipado() {
        return equipado;
    }
}
